home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 12
/
Mac Magazin and MacEasy Magazine CD - Issue 12.iso
/
Sharewarebibliothek
/
Hypercard
/
grep-replace.XFCN folder
/
rexp_src
/
HyperXCmd.h
< prev
next >
Wrap
Text File
|
1989-09-18
|
3KB
|
102 lines
/*
HyperXCmd.h Definitions for calling all standard
HyperCard callback routines from C.
©Apple Computer, Inc. 1987
All Rights Reserved.
See CFlash.C for an example of how to include this module in your
C program.
*/
typedef struct {
short int paramCount;
Handle params[16];
Handle returnValue;
Boolean passFlag;
void (*entryPoint)(); /* to call back to HyperCard */
short int request;
short int result;
long inArgs[8];
long outArgs[4];
} XCmdBlock, *XCmdBlockPtr;
typedef unsigned char Str31[32];
typedef double extended;
/*
* Result codes
*/
#define xresSucc 0
#define xresFail 1
#define xresNotImp 2
/*
* Request codes
*/
#define xreqSendCardMessage 1
#define xreqEvalExpr 2
#define xreqStringLength 3
#define xreqStringMatch 4
#define xreqSendHCMessage 5
#define xreqZeroBytes 6
#define xreqPasToZero 7
#define xreqZeroToPas 8
#define xreqStrToLong 9
#define xreqStrToNum 10
#define xreqStrToBool 11
#define xreqStrToExt 12
#define xreqLongToStr 13
#define xreqNumToStr 14
#define xreqNumToHex 15
#define xreqBoolToStr 16
#define xreqExtToStr 17
#define xreqGetGlobal 18
#define xreqSetGlobal 19
#define xreqGetFieldByName 20
#define xreqGetFieldByNum 21
#define xreqGetFieldByID 22
#define xreqSetFieldByName 23
#define xreqSetFieldByNum 24
#define xreqSetFieldByID 25
#define xreqStringEqual 26
#define xreqReturnToPas 27
#define xreqScanToReturn 28
#define xreqScanToZero 39 /* was suppose to be 29! Oops! */
/*
* Lightspeed C prototypes for the glue routines
*/
extern pascal void SendCardMessage(XCmdBlockPtr,StringPtr);
extern pascal Handle EvalExpr(XCmdBlockPtr,StringPtr);
extern pascal long StringLength(XCmdBlockPtr,StringPtr);
extern pascal Ptr StringMatch(XCmdBlockPtr,StringPtr, Ptr);
extern pascal void SendHCMessage(XCmdBlockPtr,StringPtr);
extern pascal void ZeroBytes(XCmdBlockPtr,Ptr,long);
extern pascal Handle PasToZero(XCmdBlockPtr,StringPtr);
extern pascal void ZeroToPas(XCmdBlockPtr, char *,StringPtr);
extern pascal long StrToLong(XCmdBlockPtr,Str31 *);
extern pascal long StrToNum(XCmdBlockPtr,Str31 *);
extern pascal Boolean StrToBool(XCmdBlockPtr,Str31 *);
extern pascal void StrToExt(XCmdBlockPtr,Str31 *,extended *);
extern pascal void LongToStr(XCmdBlockPtr,long,Str31 *);
extern pascal void NumToStr(XCmdBlockPtr,long,Str31 *);
extern pascal void NumToHex(XCmdBlockPtr,long,short,Str31 *);
extern pascal void BoolToStr(XCmdBlockPtr,Boolean,Str31 *);
extern pascal void ExtToStr(XCmdBlockPtr,extended *,Str31 *);
extern pascal Handle GetGlobal(XCmdBlockPtr,StringPtr);
extern pascal void SetGlobal(XCmdBlockPtr,StringPtr,Handle);
extern pascal Handle GetFieldByName(XCmdBlockPtr,Boolean,StringPtr);
extern pascal Handle GetFieldByNum(XCmdBlockPtr,Boolean,short);
extern pascal Handle GetFieldByID(XCmdBlockPtr,Boolean,short);
extern pascal void SetFieldByName(XCmdBlockPtr,Boolean,StringPtr,Handle);
extern pascal void SetFieldByNum(XCmdBlockPtr,Boolean,short,Handle);
extern pascal void SetFieldByID(XCmdBlockPtr,Boolean,short,Handle);
extern pascal Boolean StringEqual(XCmdBlockPtr,Str31 *,Str31 *);
extern pascal void ReturnToPas(XCmdBlockPtr,Ptr,StringPtr);
extern pascal void ScanToReturn(XCmdBlockPtr,Ptr *);
extern pascal void ScanToZero(XCmdBlockPtr,Ptr *);
extern pascal void DoJsr(XCmdBlockPtr);